package Week7.J0529;

import java.util.Scanner;

public class 神奇的字母二 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] hash = new int[26];
        int maxCount = 0;
        char ret = 0;

        while (scanner.hasNext()) {
            char[] s = scanner.next().toCharArray();
            for (char ch : s) {
                if (++hash[ch - 'a'] > maxCount) {
                    ret = ch;
                    maxCount = hash[ch - 'a'];
                }
            }
        }
        System.out.println(ret);
    }
}
